<template>
  <el-scrollbar class="home-page" wrap-class="scrollbar-wrapper">
    <div class="flex-row top-panel">
      <ToDo ref="todoPanel" class="todo-panel back" />
      <MyCenter ref="myCenterPanel" :dict-options="dictOptions" class="my-center-Panel back" />
    </div>
    <div class="flex-row flex-1" style="margin-top: 10px">
      <search-source ref="" class="source-list back" :dict-options="dictOptions" />
      <notice-info class="notice-panel back" />
    </div>
    <div class="flex-row flex-1" style="margin-top: 10px">
      <order-center class="back" :dict-options="dictOptions" />
    </div>
    <!-- srm供应商端
    <el-link type="warning" :underline="false" @click="handleEditInfo">{{ auditInfo?.fullName }}</el-link> -->
  </el-scrollbar>
</template>
<script>
  import { mapState } from 'pinia'
  import { QueryDictMixin } from '@package/utils'
  import { pinias } from '@/common/pinia'
  import ToDo from '../components/todo.vue'
  import MyCenter from '../components/myCenter.vue'
  import SearchSource from '../components/searchSource.vue'
  import NoticeInfo from '../components/noticeInfo.vue'
  import OrderCenter from '../components/orderCenter.vue'

  const { login } = pinias
  export default {
    name: 'Home',
    components: { ToDo, MyCenter, SearchSource, NoticeInfo, OrderCenter },
    mixins: [QueryDictMixin],
    computed: {
      ...mapState(login, ['permissionsMenu', 'auditInfo'])
    },
    data() {
      return {
        srmDictKeys: [
          'srm_supplier_info.supplier_state',
          'srm_enquiry.state',
          'srm_purchase_order.state',
          'srm_pricing.state'
        ]
      }
    },
    created() {
      if (!this.permissionsMenu.length) {
        this.$message.error('您的账号没有权限，请联系管理员添加权限！')
        return
      }
      this.initDictConfig()
    },
    mounted() {},
    methods: {}
  }
</script>
<style lang="scss" scoped>
  @import '../style/home';
  ::v-deep .el-scrollbar__wrap {
    overflow-x: hidden;
  }
  ::v-deep .el-scrollbar__bar.is-horizontal {
    height: 0 !important;
  }
</style>
